﻿using DAL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class BLLSQLInfo
    {
        /// <summary>
        /// 获取数据库信息
        /// </summary>
        /// <param name="connStr"></param>
        /// <returns></returns>
        public DataTable GetInfo(string connStr)
        {
            SQLInfos dal = new SQLInfos();
            return dal.GetInfo(connStr);
        }
        public DataTable GetTable(string connStr)
        {
            SQLInfos dal = new SQLInfos();
            return dal.GetTables(connStr);
        }
        /// <summary>
        /// 获取数据库表名列名
        /// </summary>
        /// <param name="connStr"></param>
        /// <returns></returns>
        public DataTable GetColumns(string connStr, string tableName = "")
        {
            SQLInfos dal = new SQLInfos();
            return dal.GetColumns(connStr, tableName);
        }
        public DataTable GetTableInfo(string connStr, int tableId, string tableName = "")
        {
            SQLInfos dal = new SQLInfos();
            return dal.GetTableInfo(connStr, tableId, tableName);
        }
    }
}
